function a(a) {
    return a && a.__esModule ? a : {
        default: a
    };
}

var t = a(require("../../api/api.js")), e = a(require("../../utils/util.js"));

a(require("../../utils/filter.js")), getApp();

Page({
    data: {
        email: "",
        resetSucc: !1
    },
    switchTab: function(a) {
        this.setData({
            currentNavtab: a.currentTarget.dataset.idx
        });
    },
    bindViewTap: function() {
        wx.navigateTo({
            url: "../logs/logs"
        });
    },
    emailinput: function(a) {
        var t = a.detail.value;
        if (/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,63}$/i.test(t)) e = ""; else var e = "email格式错误";
        this.setData({
            email: t,
            errorInfo: e
        });
    },
    resetPassword: function() {
        var a = this, e = {
            email: this.data.email
        };
        t.default.resetPassword({
            method: "POST",
            data: e,
            success: function(t) {
                if (t && t.data.data) {
                    var e = !!t.data.data.success;
                    a.setData({
                        resetSucc: e
                    });
                }
                if (t.data.error && "ResetPasswordEmailNotExist" === t.data.error.type) r = "email地址不存在"; else var r = "";
                a.setData({
                    errorInfo: r
                });
            }
        });
    },
    onImageError: function(a) {
        var t = this;
        e.default.errImgFun(a, t);
    }
});